home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / HyperCuber Source / HyperCuber 2.0 Source.sit / HyperCuber 2.0 Source / CColorPaneBorder.cp < prev    next >
Text File  |  1993-09-23  |  2KB  |  55 lines

  1. //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. //| CColorPaneBorder.cp
  3. //|
  4. //| This implements a colored pane border
  5. //|_______________________________________________________________________________________
  6.  
  7. #include "CColorPaneBorder.h"
  8.  
  9.  
  10.  
  11. //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  12. //| CColorPaneBorder::IColorPaneBorder
  13. //|
  14. //| Purpose: Initialize the colored pane border.
  15. //|
  16. //| Parameters: flags: border flags (for superclass)
  17. //|             color: the color of the border
  18. //|_________________________________________________________
  19.  
  20. void CColorPaneBorder::IColorPaneBorder(short borderFlags, RGBColor *the_color)
  21. {
  22.  
  23.     CPaneBorder::IPaneBorder(borderFlags);            //  Initialize as PaneBorder
  24.  
  25.     color = *the_color;                                //  Save the color
  26.  
  27. }    //==== CColorPaneBorder::IColorPaneBorder() ====\\
  28.  
  29.  
  30.  
  31. //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  32. //| CColorPaneBorder::DrawBorder
  33. //|
  34. //| Purpose: Draw the colored pane border.
  35. //|
  36. //| Parameters: pane_rect: the pane's rectangle
  37. //|_________________________________________________________
  38.  
  39. void CColorPaneBorder::DrawBorder(Rect *pane_rect)
  40. {
  41.  
  42.     RGBColor fore_color;
  43.  
  44.     GetForeColor(&fore_color);                    //  Remember current foreground color
  45.     RGBForeColor(&color);                        //  Change foreground color to border color
  46.  
  47.     CPaneBorder::DrawBorder(pane_rect);            //  Draw the border
  48.  
  49.     RGBForeColor(&fore_color);                    //  Restore foreground color
  50.  
  51. }    //==== CColorPaneBorder::DrawBorder() ====\\
  52.  
  53.  
  54.  
  55.